FROM php:7.3-fpm

MAINTAINER xtw<245094499@qq.com>

RUN apt-get update && \
    apt-get -y install libwebp-dev libjpeg-dev libpng-dev libfreetype6-dev vim

#pdo mysqli扩展
RUN docker-php-source extract && \
    docker-php-ext-install mysqli && \
    docker-php-ext-install pdo_mysql

# phpredis扩展
COPY src/redis-5.3.3.tgz /tmp/
RUN cd /tmp && \
    tar -xvf /tmp/redis-5.3.3.tgz && \
    mv /tmp/redis-5.3.3 /usr/src/php/ext/phpredis && \
    docker-php-ext-install phpredis

# gd图形库
RUN cd /usr/src/php/ext/gd && \
    docker-php-ext-configure gd --with-webp-dir=/usr/include/webp \
    --with-jpeg-dir=/usr/include \
    --with-png-dir=/usr/include \
    --with-freetype-dir=/usr/include/freetype2 && \
    docker-php-ext-install gd
